/* global ms */
var status = -1;

function action(mode, type, selection) {
    if (mode === 0) {
        status--;
    } else {
        status++;
    }

    var i = -1;
    if (status <= i++) {
        ms.dispose();
    } else if (status === i++) {
        if (!ms.isQuestActive(22712) && !ms.isQuestFinished(22712)) {
            ms.sendNextPrevS("�����ˣ�����2���ƶ�.",1531001,0x25,1);
        } else {
            ms.dispose();
        }
    } else if (status === i++) {
        ms.dispose();
    } else {
        ms.dispose();
    }
}
